home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-07 | 1.6 KB | 80 lines | [TEXT/MPS ] |
- (*
- scanVideo fb - Scan forward (if fb is "forward") or backward (if fb is "backward").
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w scanVideo.p
-
- link -m ENTRYPOINT -o HyperCommands -rt XCMD=8003 -sn Main=scanVideo ∂
- scanVideo.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
-
- Copyright © 1987,88 Apple Computer, Inc.
-
- 9/87 - Initial coding by Harry R. Chesley.
- 2/88 - Changed to new interface specification by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S scanVideo } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- type
-
- Str31 = String[31];
-
- procedure scanVideo(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- scanVideo(paramPtr);
- end;
-
- procedure scanVideo(paramPtr: XCmdPtr);
-
- var str: str255;
- firstChar: char;
-
- {$I XCmdGlue.inc}
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(errMsg);
- exit(scanVideo);
- end;
-
- {$I VideoUtil.inc}
-
- begin
- if paramPtr^.paramCount > 1 then Fail('parameter count is 0 or 1');
-
- { Get the direction. }
- str := 'forward';
- if paramPtr^.paramCount > 0 then
- begin
- GetStrParm(1,str);
- { Make sure things are in "standard" format. }
- if length(str) >= 1 then
- begin
- case str[1] of
- 'b', 'B', 'r', 'R': str := 'backward';
- end;
- end;
- end;
-
- { Do it. }
- paramPtr^.returnValue := PasToZero(videoFunc('scan',str));
- end;
-
- end.
-